package ray;

import javax.vecmath.Color3f;

import util.Point3D;
import util.Vector3D;

public class Ray {

	protected Point3D origin, end;
	protected Vector3D direction;

	public Ray(Point3D origin, Point3D end) {
		this.origin = origin;
		this.end = end;
		this.direction = new Vector3D(end.getX() - origin.getX(), end.getY()
				- origin.getY(), end.getZ() - origin.getZ());
	}

	public Point3D getOrigin() {
		return origin;
	}

	public Point3D getEnd() {
		return end;
	}

	public Vector3D getDirectionVector() {
		return direction;
	}

	public Color3f getColor(int depth) {
		return null;
	}

	public String toString() {
		return "Ray[ Start:[" + origin.getX() + "," + origin.getY() + ","
				+ origin.getZ() + "] Direction:[" + direction.getX() + ","
				+ direction.getY() + "," + direction.getZ() + "] ]";
	}

}
